package com.ruoyi.web.xxj.domain;

import java.math.BigDecimal;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * 退款记录对象 refund_info
 *
 * @author ruoyi
 * @date 2024-01-28
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class RefundInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 对外业务编号
     */
    @ApiModelProperty("对外退款业务编号")
    @Excel(name = "对外退款业务编号")
    private String outRefundNo;

    /**
     * 课程订单主键ID
     */
    @ApiModelProperty("课程订单主键ID")
    @Excel(name = "课程订单主键ID")
    private Long classOrderId;

    @ApiModelProperty("文创订单主键ID")
    @Excel(name = "文创订单主键ID")
    private Long productOrderId;

    /**
     * 微信用户ID
     */
    @ApiModelProperty("微信用户ID")
    @Excel(name = "微信用户ID")
    private Long wechatUserid;

    /**
     * 退款金额
     */
    @Excel(name = "退款金额")
    @ApiModelProperty("退款金额")
    private BigDecimal amount;

    /**
     * 退款原因
     */
    @ApiModelProperty("退款原因")
    @Excel(name = "退款原因")
    private String reason;

    /**
     * 退款状态：SUCCESS - 退款成功，CLOSED - 退款关闭，PROCESSING - 退款处理中，ABNORMAL - 退款异常
     */
    @ApiModelProperty("退款状态：SUCCESS - 退款成功，CLOSED - 退款关闭，PROCESSING - 退款处理中，ABNORMAL - 退款异常")
    @Excel(name = "退款状态：SUCCESS - 退款成功，CLOSED - 退款关闭，PROCESSING - 退款处理中，ABNORMAL - 退款异常")
    private String status;

    @ApiModelProperty("退款成功时间")
    @Excel(name = "退款成功时间")
    private String refundTime;

    /**
     * 说明：取当前退款单的退款入账方，有以下几种情况：
     * 1）退回银行卡：{银行名称}{卡类型}{卡尾号}
     * 2）退回支付用户零钱:支付用户零钱
     * 3）退还商户:商户基本账户商户结算银行账户
     * 4）退回支付用户零钱通:支付用户零钱通
     */
    @ApiModelProperty("退款入账账户")
    @Excel(name = "退款入账账户")
    private String userReceivedAccount;

    /**
     * 退款渠道 说明：枚举值：
     * - ORIGINAL—原路退款
     * - BALANCE—退回到余额
     * - OTHER_BALANCE—原账户异常退到其他余额账户
     * - OTHER_BANKCARD—原银行卡异常退到其他银行卡
     */
    @ApiModelProperty("退款渠道")
    @Excel(name = "退款渠道")
    private String channel;

    public RefundInfo(Long classOrderId, Long productOrderId) {
        super();
        this.classOrderId = classOrderId;
        this.productOrderId = productOrderId;
    }
}
